<?php 
namespace Home\Controller;
use Think\Controller;

class IndexController extends Controller{

	public function index(){
		$username=cookie('username');
		if($username){
			$this->display();
		}else{
			redirect(U('Login/login'));
		}
		


	}
	public function logout(){
		
       
        cookie('username',null);
        redirect(U('Login/login'));
   
	}


}














 ?>